Let's provide you with an overview
of the Global Load Balancer. We'll introduce you to
the main concepts first. In case you've never heard of
the Global Load Balancer, GLB, here are the components you need to
understand in order to use it effectively. The frontend is where your
application interacts with requests. You'll get a single static IP address and
you can send HTTPS traffic to it. The frontend forwards
the traffic to the URL map. The next component is a URL map which
has path based routing configuration to send traffic to one or
more backend services. The backend service contains all of
the services that handle your applications incoming requests. Cloud Run services can be a backend,
as can other services on Google Cloud. You might wonder why we call it
the Global HTTPS Load Balancer. That's because you can deploy your
application in multiple regions and send client requests to
the region closest to them. This is called cross
region load balancing. Let's explore the three parts of the
Global Load Balancer from bottom to top. Starting with the backend services. A backend service holds
backends of the same type. You can't put a Cloud Function and a Cloud Storage bucket together in one
backend service, that doesn't make sense. The backend service is
a necessary abstraction, because the backends are regional and
the URL map is global. You need backend service because you can
put multiple backends from different regions in one backend service. Examples of backends are a Compute Engine
instance group with virtual machines. A Kubernetes service in
Google Kubernetes Engine. An external endpoint, the external HTTPS
Load Balancer will proxy the requests. This last backend type can be
a way to incrementally rebuild your application when you're
still hosting parts on premise. Cloud Storage Buckets can be added to
a URL map but not to a backend service. Cloud CDN is enabled at the level
of the backend service. Which is one of the key reasons to use
the Global Load Balancer with Cloud Run. One level closer to the client from
the backend service is the URL map. A URL map can match paths or hosts in the request to send traffic
to different backend services. This is how you can combine different
Cloud Run services with a bucket to host static assets. And even forward certain request to
a service running on premises in your data center. The URL map is also useful to isolate
parts of your application from each other. If you're running an commerce website, you don't want your entire application to
stop working, if the shopping cart breaks. The last component of the three parts
in the Global HTTPS Load Balancer is the frontend. The frontend has several components. First there's an IP address,
this means that you can have a static IP address in front of your web
application on Cloud Run. The second component is the HTTPS proxy. You can configure it to use
your own SSL certificate or have Google manage the SSL certificate for
you. The third part of the frontend
is the forwarding rule. If you create a static IP and
an HTTPS proxy, you'll need to create a forwarding
rule to bind them together. If you combine an IP and
a proxy in a forwarding rule, Google Cloud knows to forward incoming
TCP connections to the HTTPS proxy. The HTTPS proxy forwards
requests to the URL map. Now we've only scratched
the surface of what's possible with the Global HTTPS Load Balancer. But this is important for you to remember. The three parts of the Global HTTPS Load
Balancer are the frontend, the URL map, and the backend services. A Cloud Run service can be a backend
service as well as other types of services in Google Cloud. And the URL map uses host and path based routing to forward
requests to backend services.